package com.cby.order.controller;


import com.cby.order.entity.query.CbyOrderQuery;
import com.cby.order.entity.vo.CbyOrderVo;
import com.cby.order.service.CbyOrderService;
import com.cby.other.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wskh
 * @since 2021-11-04
 */
@Api(tags = "订单管理")
@RestController
@RequestMapping("/order/cby_order")
@CrossOrigin
public class CbyOrderController {

    @Autowired
    CbyOrderService cbyOrderService;

    @ApiOperation("分页条件查询订单数据")
    @PostMapping("/queryOrder/{current}/{limit}")
    public R queryOrder(@PathVariable long current, @PathVariable long limit, @RequestBody CbyOrderQuery cbyOrderQuery){
        return cbyOrderService.queryOrder(current,limit,cbyOrderQuery);
    }

    @ApiOperation("获取绘图所需要的的订单数据")
    @GetMapping("/getPlotData")
    public R getPlotData(){
        return cbyOrderService.getPlotData();
    }

}

